tidy readability-const-return-type
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Thu, 28 Jan 2021 16:18:37 +0000 (09:18 -0700)
committertsteven4 <13596209+tsteven4@users.noreply.github.com>
Thu, 28 Jan 2021 16:18:37 +0000 (09:18 -0700)
with a little whitespace cleanup by hand and removal of an
unused deprecated function.

defs.h
garmin_tables.cc
garmin_tables.h
inifile.cc
mtk_logger.cc
util.cc
waypt.cc

diff --git a/defs.h b/defs.h
index a6617f0f50feb2f97946991d6ffd6cdc5f424352..5eb339f5f5f01fc3275c0fbcfd31b07e8e2a8e14 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -536,7 +536,6 @@ public:
 
   bool HasUrlLink() const;
   const UrlLink& GetUrlLink() const;
-  [[deprecated]] const QList<UrlLink> GetUrlLinks() const;
   void AddUrlLink(const UrlLink& l);
   QString CreationTimeXML() const;
   gpsbabel::DateTime GetCreationTime() const;
@@ -1118,7 +1117,7 @@ char* convert_human_date_format(const char* human_datef); /* "MM,YYYY,DD" -> "%m
 char* convert_human_time_format(const char* human_timef);      /* "HH+mm+ss"   -> "%H+%M+%S" */
 char* pretty_deg_format(double lat, double lon, char fmt, const char* sep, int html);    /* decimal ->  dd.dddd or dd mm.mmm or dd mm ss */
 
-const QString get_filename(const QString& fname);                      /* extract the filename portion */
+QString get_filename(const QString& fname);                    /* extract the filename portion */
 
 /*
  * Character encoding transformations.
index 9dc350b0292700900bc56071953d6147fb4c2815..4b0c97f3adddb2a6f35c09afece73c58e18b2fec 100644 (file)
@@ -421,7 +421,7 @@ gt_switch_display_mode_value(const unsigned char display_mode, const int protoid
   }
 }
 
-const QString
+QString
 gt_find_desc_from_icon_number(const int icon, garmin_formats_e garmin_format)
 {
   if ((garmin_format == GDB) && (icon >= 500) && (icon <= 563)) {
index 0d0f24c950186ad6c7c163d544168f57536bfa00..1dbfa37d5a2f9c45c971f0475bdf122a36869ef6 100644 (file)
@@ -38,7 +38,7 @@ struct icon_mapping_t {
 
 enum garmin_formats_e {MAPSOURCE, PCX, GARMIN_SERIAL, GDB};
 
-const QString gt_find_desc_from_icon_number(int icon, garmin_formats_e garmin_format);
+QString gt_find_desc_from_icon_number(int icon, garmin_formats_e garmin_format);
 int gt_find_icon_number_from_desc(const QString& desc, garmin_formats_e garmin_format);
 
 extern const icon_mapping_t garmin_icon_table[];
index 624f779acecfbf03dc987fca3ed12f700a757028..e529f86f5f6229be1a51e9fad2fe1f90c767e589 100644 (file)
@@ -148,7 +148,7 @@ inifile_load_file(QTextStream* stream, inifile_t* inifile, const char* myname)
   }
 }
 
-static const QString
+static QString
 inifile_find_value(const inifile_t* inifile, const QString& sec_name, const QString& key)
 {
   if (inifile == nullptr) {
index 5e11dddbf6d0a2196b5da359e8aecff2de93b0be..0c8bb9d76c0da7c4f795fd19756c7c26270f0d86 100644 (file)
@@ -303,7 +303,7 @@ static void dbg(int l, const char* msg, ...)
 //
 // It returns a temporary C string - it's totally kludged in to replace
 // TEMP_DATA_BIN being string constants.
-static const QString GetTempName(bool backup)
+static QString GetTempName(bool backup)
 {
   const char kData[]= "data.bin";
   const char kDataBackup[]= "data_old.bin";
diff --git a/util.cc b/util.cc
index 387b0057e77b16140e6b68915aa716499e4fa574..7564ed24e6fa8c7a76ea6ab867589f021b20535d 100644 (file)
--- a/util.cc
+++ b/util.cc
@@ -1679,9 +1679,9 @@ QString xml_attribute(const QXmlStreamAttributes& attributes, const QString& att
   return QString();
 }
 
-const QString get_filename(const QString& fname)
+QString get_filename(const QString& fname)
 {
-  return  QFileInfo(fname).fileName();
+  return QFileInfo(fname).fileName();
 }
 
 /* bit manipulation functions */
index ac38d57c8da6a09bdbfef73b14f10832ab73984a..0f8f918fef5e8b6932b14e586097666199c13b16 100644 (file)
--- a/waypt.cc
+++ b/waypt.cc
@@ -521,12 +521,6 @@ Waypoint::GetUrlLink() const
   return urls.GetUrlLink();
 }
 
-[[deprecated]] const QList<UrlLink>
-Waypoint::GetUrlLinks() const
-{
-  return urls;
-}
-
 void
 Waypoint::AddUrlLink(const UrlLink& l)
 {